#include "voice.h"

// static const uint8_t voice_ctrl_play[] = {0xAA, 0x02, 0x00, 0xAC};
// static const uint8_t voice_ctrl_last[] = {0xAA, 0x05, 0x00, 0xAF};
// static const uint8_t voice_ctrl_next[] = {0xAA, 0x06, 0x00, 0xB0};
// static const uint8_t voice_query_now[] = {0xAA, 0x0D, 0x00, 0xB7};
// static const uint8_t voice_set_00001[] = {0xAA, 0x1F, 0x02, 0x00, 0x01, 0xCC};
// static const uint8_t voice_set_00002[] = {0xAA, 0x1F, 0x02, 0x00, 0x02, 0xCD};

static const uint8_t voice_play_00001[] = {0xAA, 0x07, 0x02, 0x00, 0x01, 0xB4}; // 播放00001 // 1号病床请取药
static const uint8_t voice_play_00002[] = {0xAA, 0x07, 0x02, 0x00, 0x02, 0xB5}; // 播放00002 // 3号病床请取药
static const uint8_t voice_vol_up[]     = {0xAA, 0x14, 0x00, 0xBE}; // 音量+
static const uint8_t voice_vol_down[]   = {0xAA, 0x15, 0x00, 0xBF}; // 音量-


void voice_play_1()
{
    HAL_UART_Transmit(&VOICE_USART, (uint8_t *)voice_play_00001, sizeof(voice_play_00001), HAL_MAX_DELAY);
}

void voice_play_2()
{
    HAL_UART_Transmit(&VOICE_USART, (uint8_t *)voice_play_00002, sizeof(voice_play_00002), HAL_MAX_DELAY);
}

void voice_volume_up()
{
    HAL_UART_Transmit(&VOICE_USART, (uint8_t *)voice_vol_up, sizeof(voice_vol_up), HAL_MAX_DELAY);
}

void voice_volume_down()
{
    HAL_UART_Transmit(&VOICE_USART, (uint8_t *)voice_vol_down, sizeof(voice_vol_down), HAL_MAX_DELAY);
}